Page({
  data: {
    orderInfo: {} as any,
  },
  async onShow() {
    const pages = getCurrentPages()
    const orderInfo = pages[pages.length - 2].data.orderInfo
    this.setData({ orderInfo })
  },
  toDetail(e: any) {
    const { id, orderId } = e.currentTarget.dataset
    wx.navigateTo({ url: `/mall/snapshot/detail/detail?commodityId=${id}&orderId=${orderId}` })
  },
})
